<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ADC: ADC_Module Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ADC
   &#160;<span id="projectnumber">8.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_a_d_c___module.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="class_a_d_c___module-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ADC_Module Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="_a_d_c___module_8h_source.html">ADC_Module.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_d_c___module_1_1_a_d_c___config.html">ADC_Config</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Store the config of the adc.  <a href="struct_a_d_c___module_1_1_a_d_c___config.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_d_c___module_1_1_a_d_c___n_l_i_s_t.html">ADC_NLIST</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Dictionary with the differential pins as keys and the SC1A number as values.  <a href="struct_a_d_c___module_1_1_a_d_c___n_l_i_s_t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:acb8f504a1ad15b1fb3a047dec3e1b9d7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#acb8f504a1ad15b1fb3a047dec3e1b9d7">ADC_Module</a> (uint8_t ADC_number, const uint8_t *const a_channel2sc1a, const <a class="el" href="struct_a_d_c___module_1_1_a_d_c___n_l_i_s_t.html">ADC_NLIST</a> *const a_diff_table)</td></tr>
<tr class="memdesc:acb8f504a1ad15b1fb3a047dec3e1b9d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#acb8f504a1ad15b1fb3a047dec3e1b9d7">More...</a><br /></td></tr>
<tr class="separator:acb8f504a1ad15b1fb3a047dec3e1b9d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe8ed6f2a6c811ec3ef2c4aba768982f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#afe8ed6f2a6c811ec3ef2c4aba768982f">recalibrate</a> ()</td></tr>
<tr class="memdesc:afe8ed6f2a6c811ec3ef2c4aba768982f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts the calibration sequence, waits until it's done and writes the results.  <a href="#afe8ed6f2a6c811ec3ef2c4aba768982f">More...</a><br /></td></tr>
<tr class="separator:afe8ed6f2a6c811ec3ef2c4aba768982f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a037ab0589e2966cd07292c8186cad83e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a037ab0589e2966cd07292c8186cad83e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a037ab0589e2966cd07292c8186cad83e">calibrate</a> ()</td></tr>
<tr class="memdesc:a037ab0589e2966cd07292c8186cad83e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts the calibration sequence. <br /></td></tr>
<tr class="separator:a037ab0589e2966cd07292c8186cad83e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4fb69b5b2d07c3fc8f5f0bbbf05dfa2a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4fb69b5b2d07c3fc8f5f0bbbf05dfa2a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a4fb69b5b2d07c3fc8f5f0bbbf05dfa2a">wait_for_cal</a> ()</td></tr>
<tr class="memdesc:a4fb69b5b2d07c3fc8f5f0bbbf05dfa2a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Waits until calibration is finished and writes the corresponding registers. <br /></td></tr>
<tr class="separator:a4fb69b5b2d07c3fc8f5f0bbbf05dfa2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa14ea3e2c5f7d0ba794628e92a2573da"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#aa14ea3e2c5f7d0ba794628e92a2573da">setReference</a> (uint8_t type)</td></tr>
<tr class="memdesc:aa14ea3e2c5f7d0ba794628e92a2573da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the voltage reference you prefer, default is vcc.  <a href="#aa14ea3e2c5f7d0ba794628e92a2573da">More...</a><br /></td></tr>
<tr class="separator:aa14ea3e2c5f7d0ba794628e92a2573da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6bd8da02e5e9bd3b2b3db30d5faa3585"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a6bd8da02e5e9bd3b2b3db30d5faa3585">setResolution</a> (uint8_t bits)</td></tr>
<tr class="memdesc:a6bd8da02e5e9bd3b2b3db30d5faa3585"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change the resolution of the measurement.  <a href="#a6bd8da02e5e9bd3b2b3db30d5faa3585">More...</a><br /></td></tr>
<tr class="separator:a6bd8da02e5e9bd3b2b3db30d5faa3585"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58cabc09d41f6aa25319fd514b47c48f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a58cabc09d41f6aa25319fd514b47c48f"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a58cabc09d41f6aa25319fd514b47c48f">getResolution</a> ()</td></tr>
<tr class="memdesc:a58cabc09d41f6aa25319fd514b47c48f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the resolution of the <a class="el" href="class_a_d_c___module.html">ADC_Module</a>. <br /></td></tr>
<tr class="separator:a58cabc09d41f6aa25319fd514b47c48f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af3704819ccda64bae9c13a95a74e70a8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af3704819ccda64bae9c13a95a74e70a8"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#af3704819ccda64bae9c13a95a74e70a8">getMaxValue</a> ()</td></tr>
<tr class="memdesc:af3704819ccda64bae9c13a95a74e70a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the maximum value for a measurement: 2^res-1. <br /></td></tr>
<tr class="separator:af3704819ccda64bae9c13a95a74e70a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9dcb1b6195ab05fdee708472e4da939f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a9dcb1b6195ab05fdee708472e4da939f">setConversionSpeed</a> (uint8_t speed)</td></tr>
<tr class="memdesc:a9dcb1b6195ab05fdee708472e4da939f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the conversion speed.  <a href="#a9dcb1b6195ab05fdee708472e4da939f">More...</a><br /></td></tr>
<tr class="separator:a9dcb1b6195ab05fdee708472e4da939f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94a585ac8079de091133b0ef4588b037"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a94a585ac8079de091133b0ef4588b037">setSamplingSpeed</a> (uint8_t speed)</td></tr>
<tr class="memdesc:a94a585ac8079de091133b0ef4588b037"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the sampling speed.  <a href="#a94a585ac8079de091133b0ef4588b037">More...</a><br /></td></tr>
<tr class="separator:a94a585ac8079de091133b0ef4588b037"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55954618c5c27c1ffce4321e912bac52"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a55954618c5c27c1ffce4321e912bac52">setAveraging</a> (uint8_t num)</td></tr>
<tr class="memdesc:a55954618c5c27c1ffce4321e912bac52"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the number of averages.  <a href="#a55954618c5c27c1ffce4321e912bac52">More...</a><br /></td></tr>
<tr class="separator:a55954618c5c27c1ffce4321e912bac52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8be20cecbfb1e8900c9cd8d0bdb47ef7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a8be20cecbfb1e8900c9cd8d0bdb47ef7">enableInterrupts</a> ()</td></tr>
<tr class="memdesc:a8be20cecbfb1e8900c9cd8d0bdb47ef7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable interrupts.  <a href="#a8be20cecbfb1e8900c9cd8d0bdb47ef7">More...</a><br /></td></tr>
<tr class="separator:a8be20cecbfb1e8900c9cd8d0bdb47ef7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4509062644982526fee3c02e0b528fc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa4509062644982526fee3c02e0b528fc"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#aa4509062644982526fee3c02e0b528fc">disableInterrupts</a> ()</td></tr>
<tr class="memdesc:aa4509062644982526fee3c02e0b528fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable interrupts. <br /></td></tr>
<tr class="separator:aa4509062644982526fee3c02e0b528fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af3d14c01b1442c0c34b5dbc9a6e49f35"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#af3d14c01b1442c0c34b5dbc9a6e49f35">enableDMA</a> ()</td></tr>
<tr class="memdesc:af3d14c01b1442c0c34b5dbc9a6e49f35"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable DMA request.  <a href="#af3d14c01b1442c0c34b5dbc9a6e49f35">More...</a><br /></td></tr>
<tr class="separator:af3d14c01b1442c0c34b5dbc9a6e49f35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1610dcab46476f287c2dd4d96465c47"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac1610dcab46476f287c2dd4d96465c47"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#ac1610dcab46476f287c2dd4d96465c47">disableDMA</a> ()</td></tr>
<tr class="memdesc:ac1610dcab46476f287c2dd4d96465c47"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable <a class="el" href="class_a_d_c.html">ADC</a> DMA request. <br /></td></tr>
<tr class="separator:ac1610dcab46476f287c2dd4d96465c47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7a632267f21b79c31c1dae56b5da188"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#ae7a632267f21b79c31c1dae56b5da188">enableCompare</a> (int16_t compValue, bool greaterThan)</td></tr>
<tr class="memdesc:ae7a632267f21b79c31c1dae56b5da188"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable the compare function to a single value.  <a href="#ae7a632267f21b79c31c1dae56b5da188">More...</a><br /></td></tr>
<tr class="separator:ae7a632267f21b79c31c1dae56b5da188"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab8e64bab9d4e7f1935a260629e5d71d5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#ab8e64bab9d4e7f1935a260629e5d71d5">enableCompareRange</a> (int16_t lowerLimit, int16_t upperLimit, bool insideRange, bool inclusive)</td></tr>
<tr class="memdesc:ab8e64bab9d4e7f1935a260629e5d71d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable the compare function to a range.  <a href="#ab8e64bab9d4e7f1935a260629e5d71d5">More...</a><br /></td></tr>
<tr class="separator:ab8e64bab9d4e7f1935a260629e5d71d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac635f675a9690a4db016c73c31818262"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac635f675a9690a4db016c73c31818262"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#ac635f675a9690a4db016c73c31818262">disableCompare</a> ()</td></tr>
<tr class="memdesc:ac635f675a9690a4db016c73c31818262"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable the compare function. <br /></td></tr>
<tr class="separator:ac635f675a9690a4db016c73c31818262"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bef75f430c061b4bc3d48951e8930c6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a5bef75f430c061b4bc3d48951e8930c6">enablePGA</a> (uint8_t gain)</td></tr>
<tr class="memdesc:a5bef75f430c061b4bc3d48951e8930c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable and set PGA.  <a href="#a5bef75f430c061b4bc3d48951e8930c6">More...</a><br /></td></tr>
<tr class="separator:a5bef75f430c061b4bc3d48951e8930c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5734a05ce4920be3a2b7fc004a6a14d7"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a5734a05ce4920be3a2b7fc004a6a14d7">getPGA</a> ()</td></tr>
<tr class="memdesc:a5734a05ce4920be3a2b7fc004a6a14d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the PGA level.  <a href="#a5734a05ce4920be3a2b7fc004a6a14d7">More...</a><br /></td></tr>
<tr class="separator:a5734a05ce4920be3a2b7fc004a6a14d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a734ac9cf07a54e91707c78d753d3d3dd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a734ac9cf07a54e91707c78d753d3d3dd"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a734ac9cf07a54e91707c78d753d3d3dd">disablePGA</a> ()</td></tr>
<tr class="memdesc:a734ac9cf07a54e91707c78d753d3d3dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable PGA. <br /></td></tr>
<tr class="separator:a734ac9cf07a54e91707c78d753d3d3dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ff99bbd16cc6526f0a2ba04c3d3ceea"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6ff99bbd16cc6526f0a2ba04c3d3ceea"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a6ff99bbd16cc6526f0a2ba04c3d3ceea">continuousMode</a> () __attribute__((always_inline))</td></tr>
<tr class="memdesc:a6ff99bbd16cc6526f0a2ba04c3d3ceea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set continuous conversion mode. <br /></td></tr>
<tr class="separator:a6ff99bbd16cc6526f0a2ba04c3d3ceea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1d97ef99f2ec0564e12eb22b2bed784"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af1d97ef99f2ec0564e12eb22b2bed784"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#af1d97ef99f2ec0564e12eb22b2bed784">singleMode</a> () __attribute__((always_inline))</td></tr>
<tr class="memdesc:af1d97ef99f2ec0564e12eb22b2bed784"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set single-shot conversion mode. <br /></td></tr>
<tr class="separator:af1d97ef99f2ec0564e12eb22b2bed784"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a756d0ee917729be3ea6681c5afee762e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a756d0ee917729be3ea6681c5afee762e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a756d0ee917729be3ea6681c5afee762e">setSoftwareTrigger</a> () __attribute__((always_inline))</td></tr>
<tr class="memdesc:a756d0ee917729be3ea6681c5afee762e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use software to trigger the <a class="el" href="class_a_d_c.html">ADC</a>, this is the most common setting. <br /></td></tr>
<tr class="separator:a756d0ee917729be3ea6681c5afee762e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab228ecc03cb2c1463371c35ca9cdb091"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab228ecc03cb2c1463371c35ca9cdb091"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#ab228ecc03cb2c1463371c35ca9cdb091">setHardwareTrigger</a> () __attribute__((always_inline))</td></tr>
<tr class="memdesc:ab228ecc03cb2c1463371c35ca9cdb091"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use hardware to trigger the <a class="el" href="class_a_d_c.html">ADC</a>. <br /></td></tr>
<tr class="separator:ab228ecc03cb2c1463371c35ca9cdb091"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8bf2a6ed42a69a53f7c27eaf0a49470"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa8bf2a6ed42a69a53f7c27eaf0a49470"></a>
volatile bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#aa8bf2a6ed42a69a53f7c27eaf0a49470">isConverting</a> () __attribute__((always_inline))</td></tr>
<tr class="memdesc:aa8bf2a6ed42a69a53f7c27eaf0a49470"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is the <a class="el" href="class_a_d_c.html">ADC</a> converting at the moment? <br /></td></tr>
<tr class="separator:aa8bf2a6ed42a69a53f7c27eaf0a49470"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0648dd1435bfee45f9dc17908416c988"><td class="memItemLeft" align="right" valign="top">volatile bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a0648dd1435bfee45f9dc17908416c988">isComplete</a> () __attribute__((always_inline))</td></tr>
<tr class="memdesc:a0648dd1435bfee45f9dc17908416c988"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is an <a class="el" href="class_a_d_c.html">ADC</a> conversion ready?  <a href="#a0648dd1435bfee45f9dc17908416c988">More...</a><br /></td></tr>
<tr class="separator:a0648dd1435bfee45f9dc17908416c988"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0069ff00c919d00d9769b06dd3cb206"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa0069ff00c919d00d9769b06dd3cb206"></a>
volatile bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#aa0069ff00c919d00d9769b06dd3cb206">isDifferential</a> () __attribute__((always_inline))</td></tr>
<tr class="memdesc:aa0069ff00c919d00d9769b06dd3cb206"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is the <a class="el" href="class_a_d_c.html">ADC</a> in differential mode? <br /></td></tr>
<tr class="separator:aa0069ff00c919d00d9769b06dd3cb206"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54bcee43fe87ee419f28549e255e9e8b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a54bcee43fe87ee419f28549e255e9e8b"></a>
volatile bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a54bcee43fe87ee419f28549e255e9e8b">isContinuous</a> () __attribute__((always_inline))</td></tr>
<tr class="memdesc:a54bcee43fe87ee419f28549e255e9e8b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is the <a class="el" href="class_a_d_c.html">ADC</a> in continuous mode? <br /></td></tr>
<tr class="separator:a54bcee43fe87ee419f28549e255e9e8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab512734714c0c3273ceebe8c1b96c5a3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab512734714c0c3273ceebe8c1b96c5a3"></a>
volatile bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#ab512734714c0c3273ceebe8c1b96c5a3">isPGAEnabled</a> () __attribute__((always_inline))</td></tr>
<tr class="memdesc:ab512734714c0c3273ceebe8c1b96c5a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is the PGA function enabled? <br /></td></tr>
<tr class="separator:ab512734714c0c3273ceebe8c1b96c5a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9fd95a61d263a9d82918b50e81aee2e9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9fd95a61d263a9d82918b50e81aee2e9"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a9fd95a61d263a9d82918b50e81aee2e9">checkPin</a> (uint8_t pin)</td></tr>
<tr class="memdesc:a9fd95a61d263a9d82918b50e81aee2e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether the pin is a valid analog pin. <br /></td></tr>
<tr class="separator:a9fd95a61d263a9d82918b50e81aee2e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80d29662a1a32a51fec606351685ebaf"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a80d29662a1a32a51fec606351685ebaf">checkDifferentialPins</a> (uint8_t pinP, uint8_t pinN)</td></tr>
<tr class="memdesc:a80d29662a1a32a51fec606351685ebaf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether the pins are a valid analog differential pair of pins.  <a href="#a80d29662a1a32a51fec606351685ebaf">More...</a><br /></td></tr>
<tr class="separator:a80d29662a1a32a51fec606351685ebaf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33cc7fbfcb158a33e8ca276cc7b309b5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a33cc7fbfcb158a33e8ca276cc7b309b5">startReadFast</a> (uint8_t pin)</td></tr>
<tr class="memdesc:a33cc7fbfcb158a33e8ca276cc7b309b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts a single-ended conversion on the pin.  <a href="#a33cc7fbfcb158a33e8ca276cc7b309b5">More...</a><br /></td></tr>
<tr class="separator:a33cc7fbfcb158a33e8ca276cc7b309b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa503b484e691fe31172033fc928576bd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#aa503b484e691fe31172033fc928576bd">startDifferentialFast</a> (uint8_t pinP, uint8_t pinN)</td></tr>
<tr class="memdesc:aa503b484e691fe31172033fc928576bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts a differential conversion on the pair of pins.  <a href="#aa503b484e691fe31172033fc928576bd">More...</a><br /></td></tr>
<tr class="separator:aa503b484e691fe31172033fc928576bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad492adad4a9fa728625be82602bf1672"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#ad492adad4a9fa728625be82602bf1672">analogRead</a> (uint8_t pin)</td></tr>
<tr class="memdesc:ad492adad4a9fa728625be82602bf1672"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the analog value of the pin.  <a href="#ad492adad4a9fa728625be82602bf1672">More...</a><br /></td></tr>
<tr class="separator:ad492adad4a9fa728625be82602bf1672"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a57f6a9b0e3884f3862062b33f1a447"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a4a57f6a9b0e3884f3862062b33f1a447">analogReadDifferential</a> (uint8_t pinP, uint8_t pinN)</td></tr>
<tr class="memdesc:a4a57f6a9b0e3884f3862062b33f1a447"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the differential analog value of two pins (pinP - pinN).  <a href="#a4a57f6a9b0e3884f3862062b33f1a447">More...</a><br /></td></tr>
<tr class="separator:a4a57f6a9b0e3884f3862062b33f1a447"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8a13facb0c15ef14e527a37f2386ce5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#af8a13facb0c15ef14e527a37f2386ce5">startSingleRead</a> (uint8_t pin)</td></tr>
<tr class="memdesc:af8a13facb0c15ef14e527a37f2386ce5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts an analog measurement on the pin and enables interrupts.  <a href="#af8a13facb0c15ef14e527a37f2386ce5">More...</a><br /></td></tr>
<tr class="separator:af8a13facb0c15ef14e527a37f2386ce5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe85ed1855a09f18c5d2026cf08968a7"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#abe85ed1855a09f18c5d2026cf08968a7">startSingleDifferential</a> (uint8_t pinP, uint8_t pinN)</td></tr>
<tr class="memdesc:abe85ed1855a09f18c5d2026cf08968a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start a differential conversion between two pins (pinP - pinN) and enables interrupts.  <a href="#abe85ed1855a09f18c5d2026cf08968a7">More...</a><br /></td></tr>
<tr class="separator:abe85ed1855a09f18c5d2026cf08968a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01d8bbca381dccfda87b7f6d27487340"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a01d8bbca381dccfda87b7f6d27487340">readSingle</a> () __attribute__((always_inline))</td></tr>
<tr class="memdesc:a01d8bbca381dccfda87b7f6d27487340"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the analog value of a single conversion.  <a href="#a01d8bbca381dccfda87b7f6d27487340">More...</a><br /></td></tr>
<tr class="separator:a01d8bbca381dccfda87b7f6d27487340"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b6284a613c9d3e452d2fc708bf6ce98"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a2b6284a613c9d3e452d2fc708bf6ce98">startContinuous</a> (uint8_t pin)</td></tr>
<tr class="memdesc:a2b6284a613c9d3e452d2fc708bf6ce98"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts continuous conversion on the pin.  <a href="#a2b6284a613c9d3e452d2fc708bf6ce98">More...</a><br /></td></tr>
<tr class="separator:a2b6284a613c9d3e452d2fc708bf6ce98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23fd4fa6b759dcc0c029b3266f6a5fb7"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a23fd4fa6b759dcc0c029b3266f6a5fb7">startContinuousDifferential</a> (uint8_t pinP, uint8_t pinN)</td></tr>
<tr class="memdesc:a23fd4fa6b759dcc0c029b3266f6a5fb7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts continuous conversion between the pins (pinP-pinN).  <a href="#a23fd4fa6b759dcc0c029b3266f6a5fb7">More...</a><br /></td></tr>
<tr class="separator:a23fd4fa6b759dcc0c029b3266f6a5fb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3315625f0e0e87ddcf15d6493acb2f4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#ae3315625f0e0e87ddcf15d6493acb2f4">analogReadContinuous</a> () __attribute__((always_inline))</td></tr>
<tr class="memdesc:ae3315625f0e0e87ddcf15d6493acb2f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the analog value of a continuous conversion.  <a href="#ae3315625f0e0e87ddcf15d6493acb2f4">More...</a><br /></td></tr>
<tr class="separator:ae3315625f0e0e87ddcf15d6493acb2f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9af29f865bdd376d954112d36b0992f0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9af29f865bdd376d954112d36b0992f0"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a9af29f865bdd376d954112d36b0992f0">stopContinuous</a> ()</td></tr>
<tr class="memdesc:a9af29f865bdd376d954112d36b0992f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops continuous conversion. <br /></td></tr>
<tr class="separator:a9af29f865bdd376d954112d36b0992f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acced2e2266868323ff2c53df96791a15"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#acced2e2266868323ff2c53df96791a15">startPDB</a> (uint32_t freq)</td></tr>
<tr class="memdesc:acced2e2266868323ff2c53df96791a15"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start PDB triggering the <a class="el" href="class_a_d_c.html">ADC</a> at the frequency.  <a href="#acced2e2266868323ff2c53df96791a15">More...</a><br /></td></tr>
<tr class="separator:acced2e2266868323ff2c53df96791a15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab25eb12b50ef1002100ac6cd865cc6dc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab25eb12b50ef1002100ac6cd865cc6dc"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#ab25eb12b50ef1002100ac6cd865cc6dc">stopPDB</a> ()</td></tr>
<tr class="memdesc:ab25eb12b50ef1002100ac6cd865cc6dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stop the PDB. <br /></td></tr>
<tr class="separator:ab25eb12b50ef1002100ac6cd865cc6dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2ee5bc5b76647506e597c178c9691d3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af2ee5bc5b76647506e597c178c9691d3"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#af2ee5bc5b76647506e597c178c9691d3">saveConfig</a> (<a class="el" href="struct_a_d_c___module_1_1_a_d_c___config.html">ADC_Config</a> *config)</td></tr>
<tr class="memdesc:af2ee5bc5b76647506e597c178c9691d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Save config of the <a class="el" href="class_a_d_c.html">ADC</a> to the <a class="el" href="struct_a_d_c___module_1_1_a_d_c___config.html" title="Store the config of the adc. ">ADC_Config</a> struct. <br /></td></tr>
<tr class="separator:af2ee5bc5b76647506e597c178c9691d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1bb50f669bbc41937fb5157abe2050ca"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1bb50f669bbc41937fb5157abe2050ca"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a1bb50f669bbc41937fb5157abe2050ca">loadConfig</a> (const <a class="el" href="struct_a_d_c___module_1_1_a_d_c___config.html">ADC_Config</a> *config)</td></tr>
<tr class="memdesc:a1bb50f669bbc41937fb5157abe2050ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load config to the <a class="el" href="class_a_d_c.html">ADC</a>. <br /></td></tr>
<tr class="separator:a1bb50f669bbc41937fb5157abe2050ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a2818d3ddf98d393290e652cff6f7dcb9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2818d3ddf98d393290e652cff6f7dcb9"></a>
struct <a class="el" href="struct_a_d_c___module_1_1_a_d_c___config.html">ADC_Module::ADC_Config</a>&#160;</td><td class="memItemRight" valign="bottom"><b>adc_config</b></td></tr>
<tr class="separator:a2818d3ddf98d393290e652cff6f7dcb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34f6f7878889aa3644b279f9440dc0bf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a34f6f7878889aa3644b279f9440dc0bf"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a34f6f7878889aa3644b279f9440dc0bf">adcWasInUse</a></td></tr>
<tr class="memdesc:a34f6f7878889aa3644b279f9440dc0bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Was the adc in use before a call? <br /></td></tr>
<tr class="separator:a34f6f7878889aa3644b279f9440dc0bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27fdc83a7dbe3a8c8c24fc4273414256"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a27fdc83a7dbe3a8c8c24fc4273414256"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a27fdc83a7dbe3a8c8c24fc4273414256">num_measurements</a></td></tr>
<tr class="memdesc:a27fdc83a7dbe3a8c8c24fc4273414256"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of measurements that the <a class="el" href="class_a_d_c.html">ADC</a> is performing. <br /></td></tr>
<tr class="separator:a27fdc83a7dbe3a8c8c24fc4273414256"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a955464266681b30897677ec31a40e529"><td class="memItemLeft" align="right" valign="top">volatile uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a955464266681b30897677ec31a40e529">fail_flag</a></td></tr>
<tr class="memdesc:a955464266681b30897677ec31a40e529"><td class="mdescLeft">&#160;</td><td class="mdescRight">This flag indicates that some kind of error took place.  <a href="#a955464266681b30897677ec31a40e529">More...</a><br /></td></tr>
<tr class="separator:a955464266681b30897677ec31a40e529"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac821322a022652d2a33cc29a8a7ba4aa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac821322a022652d2a33cc29a8a7ba4aa"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#ac821322a022652d2a33cc29a8a7ba4aa">ADC_num</a></td></tr>
<tr class="memdesc:ac821322a022652d2a33cc29a8a7ba4aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Which adc is this? <br /></td></tr>
<tr class="separator:ac821322a022652d2a33cc29a8a7ba4aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class <a class="el" href="class_a_d_c___module.html">ADC_Module</a>: Implements all functions of the Teensy 3.x analog to digital converter </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="acb8f504a1ad15b1fb3a047dec3e1b9d7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ADC_Module::ADC_Module </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>ADC_number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *const&#160;</td>
          <td class="paramname"><em>a_channel2sc1a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="struct_a_d_c___module_1_1_a_d_c___n_l_i_s_t.html">ADC_NLIST</a> *const&#160;</td>
          <td class="paramname"><em>a_diff_table</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor. </p>
<p>Pass the <a class="el" href="class_a_d_c.html">ADC</a> number and the Channel number to SC1A number arrays. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a_channel2sc1a</td><td>contains an index that pairs each pin to its SC1A number (used to start a conversion on that pin) </td></tr>
    <tr><td class="paramname">a_diff_table</td><td>is similar to a_channel2sc1a, but for differential pins. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ad492adad4a9fa728625be82602bf1672"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ADC_Module::analogRead </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the analog value of the pin. </p>
<p>It waits until the value is read and then returns the result. If a comparison has been set up and fails, it will return ADC_ERROR_VALUE. This function is interrupt safe, so it will restore the adc to the state it was before being called </p>

</div>
</div>
<a class="anchor" id="ae3315625f0e0e87ddcf15d6493acb2f4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int ADC_Module::analogReadContinuous </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reads the analog value of a continuous conversion. </p>
<p>Set the continuous conversion with with analogStartContinuous(pin) or startContinuousDifferential(pinP, pinN). </p><dl class="section return"><dt>Returns</dt><dd>the last converted value. If single-ended and 16 bits it's necessary to typecast it to an unsigned type (like uint16_t), otherwise values larger than 3.3/2 V are interpreted as negative! </dd></dl>

</div>
</div>
<a class="anchor" id="a4a57f6a9b0e3884f3862062b33f1a447"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ADC_Module::analogReadDifferential </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinP</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinN</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads the differential analog value of two pins (pinP - pinN). </p>
<p>It waits until the value is read and then returns the result. If a comparison has been set up and fails, it will return ADC_ERROR_DIFF_VALUE. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pinP</td><td>must be A10 or A12. </td></tr>
    <tr><td class="paramname">pinN</td><td>must be A11 (if pinP=A10) or A13 (if pinP=A12).. Other pins will return ADC_ERROR_DIFF_VALUE. This function is interrupt safe, so it will restore the adc to the state it was before being called </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a80d29662a1a32a51fec606351685ebaf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ADC_Module::checkDifferentialPins </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinP</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinN</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check whether the pins are a valid analog differential pair of pins. </p>
<p>If PGA is enabled it also checks that this ADCx can use PGA on this pins </p>

</div>
</div>
<a class="anchor" id="ae7a632267f21b79c31c1dae56b5da188"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::enableCompare </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>compValue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>greaterThan</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable the compare function to a single value. </p>
<p>A conversion will be completed only when the <a class="el" href="class_a_d_c.html">ADC</a> value is &gt;= compValue (greaterThan=1) or &lt; compValue (greaterThan=0) Call it after changing the resolution Use with interrupts or poll conversion completion with <a class="el" href="class_a_d_c___module.html#a0648dd1435bfee45f9dc17908416c988" title="Is an ADC conversion ready? ">isComplete()</a> </p>

</div>
</div>
<a class="anchor" id="ab8e64bab9d4e7f1935a260629e5d71d5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::enableCompareRange </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>lowerLimit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>upperLimit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>insideRange</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>inclusive</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable the compare function to a range. </p>
<p>A conversion will be completed only when the <a class="el" href="class_a_d_c.html">ADC</a> value is inside (insideRange=1) or outside (=0) the range given by (lowerLimit, upperLimit),including (inclusive=1) the limits or not (inclusive=0). See Table 31-78, p. 617 of the freescale manual. Call it after changing the resolution Use with interrupts or poll conversion completion with <a class="el" href="class_a_d_c___module.html#a0648dd1435bfee45f9dc17908416c988" title="Is an ADC conversion ready? ">isComplete()</a> </p>

</div>
</div>
<a class="anchor" id="af3d14c01b1442c0c34b5dbc9a6e49f35"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::enableDMA </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable DMA request. </p>
<p>An <a class="el" href="class_a_d_c.html">ADC</a> DMA request will be raised when the conversion is completed (including hardware averages and if the comparison (if any) is true). </p>

</div>
</div>
<a class="anchor" id="a8be20cecbfb1e8900c9cd8d0bdb47ef7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::enableInterrupts </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable interrupts. </p>
<p>An IRQ_ADC0 Interrupt will be raised when the conversion is completed (including hardware averages and if the comparison (if any) is true). </p>

</div>
</div>
<a class="anchor" id="a5bef75f430c061b4bc3d48951e8930c6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::enablePGA </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>gain</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable and set PGA. </p>
<p>Enables the PGA and sets the gain Use only for signals lower than 1.2 V </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gain</td><td>can be 1, 2, 4, 8, 16, 32 or 64 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a5734a05ce4920be3a2b7fc004a6a14d7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t ADC_Module::getPGA </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the PGA level. </p>
<p>PGA from 1 to 64 </p>

</div>
</div>
<a class="anchor" id="a0648dd1435bfee45f9dc17908416c988"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">volatile bool ADC_Module::isComplete </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Is an <a class="el" href="class_a_d_c.html">ADC</a> conversion ready? </p>
<dl class="section return"><dt>Returns</dt><dd>1 if yes, 0 if not. When a value is read this function returns 0 until a new value exists So it only makes sense to call it before <a class="el" href="class_a_d_c___module.html#ae3315625f0e0e87ddcf15d6493acb2f4" title="Reads the analog value of a continuous conversion. ">analogReadContinuous()</a> or <a class="el" href="class_a_d_c___module.html#a01d8bbca381dccfda87b7f6d27487340" title="Reads the analog value of a single conversion. ">readSingle()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a01d8bbca381dccfda87b7f6d27487340"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int ADC_Module::readSingle </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reads the analog value of a single conversion. </p>
<p>Set the conversion with with startSingleRead(pin) or startSingleDifferential(pinP, pinN). </p><dl class="section return"><dt>Returns</dt><dd>the converted value. </dd></dl>

</div>
</div>
<a class="anchor" id="afe8ed6f2a6c811ec3ef2c4aba768982f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::recalibrate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts the calibration sequence, waits until it's done and writes the results. </p>
<p>Usually it's not necessary to call this function directly, but do it if the "enviroment" changed significantly since the program was started. </p>

</div>
</div>
<a class="anchor" id="a55954618c5c27c1ffce4321e912bac52"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::setAveraging </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>num</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the number of averages. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">num</td><td>can be 0, 4, 8, 16 or 32.</td></tr>
  </table>
  </dd>
</dl>
<p>It doesn't recalibrate at the end. </p>

</div>
</div>
<a class="anchor" id="a9dcb1b6195ab05fdee708472e4da939f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::setConversionSpeed </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>speed</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the conversion speed. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">speed</td><td>can be ADC_VERY_LOW_SPEED, ADC_LOW_SPEED, ADC_MED_SPEED, ADC_HIGH_SPEED_16BITS, ADC_HIGH_SPEED or ADC_VERY_HIGH_SPEED.</td></tr>
  </table>
  </dd>
</dl>
<p>ADC_VERY_LOW_SPEED is guaranteed to be the lowest possible speed within specs for resolutions less than 16 bits (higher than 1 MHz), it's different from ADC_LOW_SPEED only for 24, 4 or 2 MHz bus frequency. ADC_LOW_SPEED is guaranteed to be the lowest possible speed within specs for all resolutions (higher than 2 MHz). ADC_MED_SPEED is always &gt;= ADC_LOW_SPEED and &lt;= ADC_HIGH_SPEED. ADC_HIGH_SPEED_16BITS is guaranteed to be the highest possible speed within specs for all resolutions (lower or eq than 12 MHz). ADC_HIGH_SPEED is guaranteed to be the highest possible speed within specs for resolutions less than 16 bits (lower or eq than 18 MHz). ADC_VERY_HIGH_SPEED may be out of specs, it's different from ADC_HIGH_SPEED only for 48, 40 or 24 MHz bus frequency.</p>
<p>Additionally the conversion speed can also be ADC_ADACK_2_4, ADC_ADACK_4_0, ADC_ADACK_5_2 and ADC_ADACK_6_2, where the numbers are the frequency of the <a class="el" href="class_a_d_c.html">ADC</a> clock (ADCK) in MHz and are independent on the bus speed. This is useful if you are using the Teensy at a very low clock frequency but want faster conversions, but if F_BUS&lt;F_ADCK, you can't use ADC_VERY_HIGH_SPEED for sampling speed. </p>

</div>
</div>
<a class="anchor" id="aa14ea3e2c5f7d0ba794628e92a2573da"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::setReference </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>type</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the voltage reference you prefer, default is vcc. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>can be ADC_REF_3V3, ADC_REF_1V2 (not for Teensy LC) or ADC_REF_EXT</td></tr>
  </table>
  </dd>
</dl>
<p>It recalibrates at the end. </p>

</div>
</div>
<a class="anchor" id="a6bd8da02e5e9bd3b2b3db30d5faa3585"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::setResolution </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>bits</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Change the resolution of the measurement. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bits</td><td>is the number of bits of resolution. For single-ended measurements: 8, 10, 12 or 16 bits. For differential measurements: 9, 11, 13 or 16 bits. If you want something in between (11 bits single-ended for example) select the inmediate higher and shift the result one to the right.</td></tr>
  </table>
  </dd>
</dl>
<p>Whenever you change the resolution, change also the comparison values (if you use them). </p>

</div>
</div>
<a class="anchor" id="a94a585ac8079de091133b0ef4588b037"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::setSamplingSpeed </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>speed</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the sampling speed. </p>
<p>Increase the sampling speed for low impedance sources, decrease it for higher impedance ones. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">speed</td><td>can be ADC_VERY_LOW_SPEED, ADC_LOW_SPEED, ADC_MED_SPEED, ADC_HIGH_SPEED or ADC_VERY_HIGH_SPEED.</td></tr>
  </table>
  </dd>
</dl>
<p>ADC_VERY_LOW_SPEED is the lowest possible sampling speed (+24 ADCK). ADC_LOW_SPEED adds +16 ADCK. ADC_MED_SPEED adds +10 ADCK. ADC_HIGH_SPEED (or ADC_HIGH_SPEED_16BITS) adds +6 ADCK. ADC_VERY_HIGH_SPEED is the highest possible sampling speed (0 ADCK added). </p>

</div>
</div>
<a class="anchor" id="a2b6284a613c9d3e452d2fc708bf6ce98"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ADC_Module::startContinuous </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts continuous conversion on the pin. </p>
<p>It returns as soon as the <a class="el" href="class_a_d_c.html">ADC</a> is set, use <a class="el" href="class_a_d_c___module.html#ae3315625f0e0e87ddcf15d6493acb2f4" title="Reads the analog value of a continuous conversion. ">analogReadContinuous()</a> to read the value. </p>

</div>
</div>
<a class="anchor" id="a23fd4fa6b759dcc0c029b3266f6a5fb7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ADC_Module::startContinuousDifferential </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinP</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinN</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts continuous conversion between the pins (pinP-pinN). </p>
<p>It returns as soon as the <a class="el" href="class_a_d_c.html">ADC</a> is set, use <a class="el" href="class_a_d_c___module.html#ae3315625f0e0e87ddcf15d6493acb2f4" title="Reads the analog value of a continuous conversion. ">analogReadContinuous()</a> to read the value. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pinP</td><td>must be A10 or A12. </td></tr>
    <tr><td class="paramname">pinN</td><td>must be A11 (if pinP=A10) or A13 (if pinP=A12). Other pins will return ADC_ERROR_DIFF_VALUE. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aa503b484e691fe31172033fc928576bd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::startDifferentialFast </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinP</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinN</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts a differential conversion on the pair of pins. </p>
<p>It sets the mux correctly, doesn't do any of the checks on the pin and doesn't change the continuous conversion bit. </p>

</div>
</div>
<a class="anchor" id="acced2e2266868323ff2c53df96791a15"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::startPDB </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>freq</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start PDB triggering the <a class="el" href="class_a_d_c.html">ADC</a> at the frequency. </p>
<p>Call analogRead on the pin that you want to measure before calling this function. See the example. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">freq</td><td>is the frequency of the <a class="el" href="class_a_d_c.html">ADC</a> conversion, it can't be lower that 1 Hz </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a33cc7fbfcb158a33e8ca276cc7b309b5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::startReadFast </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts a single-ended conversion on the pin. </p>
<p>It sets the mux correctly, doesn't do any of the checks on the pin and doesn't change the continuous conversion bit. </p>

</div>
</div>
<a class="anchor" id="abe85ed1855a09f18c5d2026cf08968a7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ADC_Module::startSingleDifferential </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinP</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinN</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start a differential conversion between two pins (pinP - pinN) and enables interrupts. </p>
<p>It returns immediately, get value with <a class="el" href="class_a_d_c___module.html#a01d8bbca381dccfda87b7f6d27487340" title="Reads the analog value of a single conversion. ">readSingle()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pinP</td><td>must be A10 or A12. </td></tr>
    <tr><td class="paramname">pinN</td><td>must be A11 (if pinP=A10) or A13 (if pinP=A12). Other pins will return ADC_ERROR_DIFF_VALUE. If this function interrupts a measurement, it stores the settings in adc_config </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="af8a13facb0c15ef14e527a37f2386ce5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ADC_Module::startSingleRead </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts an analog measurement on the pin and enables interrupts. </p>
<p>It returns immediately, get value with <a class="el" href="class_a_d_c___module.html#a01d8bbca381dccfda87b7f6d27487340" title="Reads the analog value of a single conversion. ">readSingle()</a>. If the pin is incorrect it returns ADC_ERROR_VALUE If this function interrupts a measurement, it stores the settings in adc_config </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a955464266681b30897677ec31a40e529"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile uint16_t ADC_Module::fail_flag</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This flag indicates that some kind of error took place. </p>
<p>Use the defines at the beggining of this file to find out what caused the fail. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_a_d_c___module_8h_source.html">ADC_Module.h</a></li>
<li>ADC_Module.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_a_d_c___module.html">ADC_Module</a></li>
    <li class="footer">Generated on Sun Jun 26 2016 16:42:58 for ADC by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
